gen DIFVALUE= P_TM_NC- P_TM_OC

Figure 1:
generate DIFVALUE1= DIFVALUE if P_LANGUAGE==1
generate DIFVALUE0= DIFVALUE if P_LANGUAGE==0
ciplot DIFVALUE1 DIFVALUE0, by(COUNTRY) inclusive hor

lowess DIFVALUE CULTURE_NC_P, by(COUNTRY)

scatter DIFVALUE CULTURE_NC_P || lfit DIFVALUE CULTURE_NC_P, by(COUNTRY)

ciplot DIFVALUE1 DIFVALUE0,  inclusive hor name(g1)
lowess DIFVALUE CULTURE_NC_P, name(g2)
graph combine g1 g2 



REGRESSIONS:
reg DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER P_FORWARD  i.P_LANGUAGE c.P_AGE NC_TRANSFERS 
predict k if e(sample)==1, rstudent
reg DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER   i.P_LANGUAGE c.P_AGE  NC_TRANSFERS if abs(k)<3, cluster(NC_ID)
robreg m DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER   i.P_LANGUAGE c.P_AGE  NC_TRANSFERS, cluster(NC_ID) eff(99)


reg DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER P_FORWARD  CULTURE_NC_P c.P_AGE   NC_TRANSFERS
predict kk if e(sample)==1, rstudent
reg DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER   CULTURE_NC_P c.P_AGE  NC_TRANSFERS if abs(kk)<3, cluster(NC_ID)
robreg m DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER  CULTURE_NC_P c.P_AGE   NC_TRANSFERS, cluster(NC_ID) eff(99)







INTERACTION WITH AGE
reg DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER P_FORWARD  i.P_LANGUAGE##c.P_AGE  NC_TRANSFERS
predict n if e(sample)==1, rstudent
reg DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDE  i.P_LANGUAGE##c.P_AGE  NC_TRANSFERS if abs(n)<3, cluster(NC_ID)
margins P_LANGUAGE, at (P_AGE=(25(2)35))
marginsplot, name(d1)
robreg m DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER  i.P_LANGUAGE##c. P_AGE NC_TRANSFERS, cluster(NC_ID) eff(99)


reg DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER   c.CULTURE_NC_P##c.P_AGE  NC_TRANSFERS
predict nn if e(sample)==1, rstudent
reg DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER  c.CULTURE_NC_P##c.P_AGE  NC_TRANSFERS if abs(nn)<3, cluster(NC_ID)
margins, dydx(CULTURE_NC_P) at(P_AGE=(18(5)33)) vsquish
marginsplot, name(c1)
robreg m DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER   c.CULTURE_NC_P##c.P_AGE NC_TRANSFERS, cluster(NC_ID) eff(99)


INTERACTION WITH NC_TRANSFERS
reg DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER i.P_LANGUAGE##c.NC_TRANSFERS P_AGE  
predict l if e(sample)==1, rstudent
reg DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER i.P_LANGUAGE##c.NC_TRANSFERS   P_AGE if abs(l)<3, cluster(NC_ID)
margins P_LANGUAGE, at (NC_TRANSFERS=(10(2)20))
marginsplot, name(d2)
graph combine d1 d2
robreg m DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER   i.P_LANGUAGE##c. NC_TRANSFERS P_AGE, cluster(NC_ID) eff(99)
 
 
reg DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER c.CULTURE_NC_P##c.NC_TRANSFERS   P_AGE 
predict ll if e(sample)==1, rstudent
reg DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER c.CULTURE_NC_P##c.NC_TRANSFERS   P_AGE if abs(ll)<3, cluster(NC_ID)
margins, dydx(CULTURE_NC_P) at(NC_TRANSFERS=(1(5)21)) vsquish
marginsplot, name(c2)
graph combine c1 c2
robreg m DIFVALUE P_TM_OC   NC_POSITION_20_21 P_GOALKEEPER P_DEFENDER P_MIDFIELDER c.CULTURE_NC_P##c.NC_TRANSFERS   P_AGE, cluster(NC_ID) eff(99)
